-- GENERATED SPELL FOR [Warp Chaser] --


function spell0_18884(pUnit, Event) --@Phasing Invisibility,Self--
pUnit:FullCastSpellOnTarget(32942,pUnit)
pUnit:RegisterEvent('Sorts_18884', 0, 1)
end

function spell1_18884(pUnit, Event) --@Venomous Bite,n/a--
pUnit:FullCastSpellOnTarget(32739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18884', 10000, 1)
end

function spell2_18884(pUnit, Event) --@Warp Charge,n/a--
pUnit:FullCastSpellOnTarget(37417,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18884', 1252, 1)
end

function Sorts_18884(pUnit, Event)
local choix_sorts_18884 = math.random(0, 2)
if choix_sorts_18884 == 0 then
pUnit:RegisterEvent('spell0_18884', 1, 1)
end
if choix_sorts_18884 == 1 then
pUnit:RegisterEvent('spell1_18884', 1, 1)
end
if choix_sorts_18884 == 2 then
pUnit:RegisterEvent('spell2_18884', 1, 1)
end
end

function mob18884_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18884', math.random(1500, 3000), 1)
end

function mob18884_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18884_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18884_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18884, 1, 'mob18884_Action')
RegisterUnitEvent(18884, 2, 'mob18884_Leave')
RegisterUnitEvent(18884, 3, 'mob18884_Kill')
RegisterUnitEvent(18884, 4, 'mob18884_Die')
